package com.example.mybatisplusdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mybatisplusdemo.model.domain.GoodOrder;
import com.example.mybatisplusdemo.model.vo.OrderDetailVo;
import com.example.mybatisplusdemo.model.vo.OrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lxp
 * @since 2025-07-15
 */
public interface OrderMapper extends BaseMapper<GoodOrder> {

    OrderVo selectByIdWithUser(@Param("id") int id);

    OrderDetailVo selectOrderDetailById(@Param("id") int id);

    List<OrderVo> selectOrderListByUserId(@Param("userId") int userId);

    List<OrderVo> selectOrderListByStatus(@Param("status") int status);
}
